<?php
require_once('pworks/mvc/action/BaseAction.class.php');
require_once "xpface/util/PostData.class.php";

class WSClientAction extends BaseAction {
    
    /**
	 * @isnull false
	 */
    public $api_name;
    
    public function execute(){
        if (!defined("WS_SERVICE")) {
            echo "\"WS_SERVICE\" is not defined! ";
            return ;
        }
        if (!defined("WS_TOKEN")) {
            echo "\"WS_TOKEN\" is not defined! ";
            return ;
        }
        $api = str_replace("#API_NAME#", $this->api_name, WS_SERVICE);
        unset($_REQUEST["api_name"]);
        //var_dump($api);
        echo PostData::post($api, $_REQUEST);
    }
}
